package com.ws.universal.tools.wsui.headle;

import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.view.View;

import androidx.annotation.NonNull;

import com.ws.universal.tools.wsui.help.QMUIResHelper;
import com.ws.universal.tools.wsui.skin.IQMUISkinRuleHandler;
import com.ws.universal.tools.wsui.skin.QMUISkinManager;

import org.jetbrains.annotations.NotNull;

public abstract class QMUISkinRuleDrawableHandler implements IQMUISkinRuleHandler {
    @Override
    public final void handle(@NotNull @NonNull QMUISkinManager skinManager,
                             @NotNull @NonNull View view,
                             @NotNull @NonNull Resources.Theme theme,
                             @NotNull @NonNull String name, int attr) {
        handle(view, name, QMUIResHelper.getAttrDrawable(view.getContext(), theme, attr));
    }

    protected abstract void handle(@NonNull View view, @NonNull String name, Drawable drawable);

}
